package com.huangfu.learning.javabase.java.pattern.create.abstractfactory;

/**
 * 超级工厂，构建工厂的工厂
 */
public class FactoryProducer {
    public static AbstractFactoryCar getFactroy(String type) throws IllegalAccessException, InstantiationException, ClassNotFoundException {
        System.out.println("创建工厂：" + type);
        Class clazz = Class.forName(type);
        return (AbstractFactoryCar) clazz.newInstance();
    }
}
